<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>北京云易智创科技有限公司-官网</title>
    <header th:replace="client/util.html"></header>
</head>
<body>
<!-- nav部分 -->
<div th:replace="client/head.html"></div>
<!-- banner部分 -->
<div class="banner product">
    <div class="title">
        <p>产品展示</p>
        <p class="en">Product Display</p>
    </div>
</div>
<!-- main部分 -->
<div class="main product">
    <div class="layui-container" id="productView">

    </div>
</div>
<!-- footer部分 -->
<div th:replace="client/foot.html"></div>
<script>
    layui.use(['layer', 'form'], function () {
        var layer = layui.layer
        $.ajax({
            url: "/client/product/allProduct",
            type: "GET",
            dataType: "json",
            success: function (result) {
                var items = '';
                result.forEach(function (value, index) {
                    var item = '';
                    item += '<div class="content layui-row">';
                    item += '   <div class="layui-col-xs12 layui-col-sm6 layui-col-md7 layui-col-lg6 content-img"><img src="' + value.picture + '" style="width: 500px;height: 320px;"></div>';
                    item += '   <div class="layui-col-xs12 layui-col-sm6 layui-col-md5 layui-col-lg6 right">';
                    item += '       <p class="label">' + value.title + '</p>';
                    item += '       <p class="detail">' + value.content + '</p>';
                    item += '       <div><a href="javascript:;">查看产品 ></a></div>';
                    item += '   </div>';
                    item += '</div>';
                    //console.log(item);
                    items += (item);
                })
                $("#productView").html(items);
            }
        });
    });
</script>
</body>
</html>